package starsservice.com.kc.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import starsservice.com.kc.bean.Groud;
import starsservice.com.kc.mapper.GroudMapper;
import starsservice.com.kc.service.IGroudService;

import javax.annotation.Resource;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-12-15
 */
@Service
public class GroudServiceImpl extends ServiceImpl<GroudMapper, Groud> implements IGroudService {

    @Resource
    private GroudMapper groudMapper;

    @Override
    public int InsterGroud(String Id) {
        Groud groud = new Groud();
        groud.setAccountId(Id);
        return groudMapper.insert(groud);
    }

    @Override
    public Groud selectByGroudId(String id) {
        return groudMapper.selectByGroudId(Wrappers.<Groud>lambdaQuery()
        .eq(Groud::getAccountId,id));
    }
}
